import cn.kgc.gl.pojo.Detail;
import cn.kgc.gl.service.DetailService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author:
 * @date: 2022/1/2
 * @description:
 */
public class Test02 {
    @Test
    public void test01(){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");

        DetailService detailService = applicationContext.getBean(DetailService.class);

        List<Detail> details = detailService.selDetails();

        for (Detail detail : details) {
            System.out.println(detail);
        }
    }
}